<admintpl file="header"/>
</head>
<body class="need_breadcrumb_back">
	<div class="wrap js-check-wrap">
		{:sp_get_admin_breadcrumb()}
		<form action="{:U('Region/edit_post')}" method="post" class="form-horizontal js-ajax-forms" enctype="multipart/form-data">
			<input type="hidden" name="region_id" value="{$region.region_id}">
			<div class="row-fluid mtop20">
				<div class="span7">
					<fieldset class="width80p">
						<div class="control-group info">
							<label class="control-label">上级地区</label>
							<div class="controls">
								<input type="text" name="name" value="{$parent.name}" disabled="disabled">
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">地区名称</label>
							<div class="controls">
								<input type="text" name="name" value="{$region.name}" required>
								<span class="form-required">*</span>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">别名</label>
							<div class="controls">
								<input type="text" name="alias" placeholder="地区别名,英文字母组成" value="{$region.alias}">
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">区号</label>
							<div class="controls">
								<input type="text" name="area_code" placeholder="地区编号" value="{$region.area_code}">
							</div>							
						</div>
					</fieldset>
				</div>
				<div class="span5"></div>
			</div>
			<div class="form-actions">
				<button class="btn btn-primary js-ajax-submit" type="submit"><i class="fa fa-save" aria-hidden="true"></i>{:L("SAVE")}</button>
				<a class="btn" href="javascript:history.back();"><i class="fa fa-reply" aria-hidden="true"></i>{:L('BACK')}</a>
			</div>
		</form>
	</div>
	<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
	<script type="text/javascript">
		$(function() {
			ajaxFormSubmitInit({
					'name' : {required : 1}
				}, {
					'name' : {required : '请输入地区名称'}
				}, [{
	                	name : '继续编辑？',
		                callback : function() {
		                    reloadPage(window);
		                    return true;
		                },
		                focus : true
		            }, {
		                name : '返回列表',
		                callback : function() {
		                	window.location.href = "{:U('Region/index', array('pid' => $parent['region_id']))}";
		                    return true;
		                }
		            }
	            ]
            );
		});
	</script>
</body>
</html>